#ifndef __NFA__

#define __NFA__

#include<iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include"nfastate.h"
#include"nfarule.h"
#include"namestorage.h"

using std::string;

class NFA {

	unsigned S;
	std::vector <NFARule> rules;
	static NameStorage names;
	
	static NameStorage initNames();
	static NFARule get_rule_from_stream(std::istream&);

public:
	
	NFA(){}
	~NFA(){}

	friend std::istream & operator>>(std::istream &, NFA &);
	NFAState startingState(){return NFAState(S);}
	NFAState feedTerminal(unsigned, char);
	NFAState feedTerminal(NFAState const &, char);
	NFAState feedString(unsigned, string const &);
	NFAState feedString(NFAState const &, string const &);
	friend std::ostream & operator<<(std::ostream &, NFA const &);
};

#endif
